const db = require("../lib/db")

function deleteArticleList(id){
    return new Promise((resolve , reject)=>{
        let sql = "delete from article where _id = '" + id + "' " 
        db.querySql(sql).then(data => {
            if(data.affectedRows == 0){
                resolve(501)
            }else {
                resolve(200)
            }   
        })
    })
}

module.exports = deleteArticleList